#pragma once

#include <QListWidget>
#include <QPushButton>
#include "particledefine.h"
#include <QVector>

namespace ParticleEditor
{
	class LayersBrowser : public QWidget
	{
		Q_OBJECT
	public:
		LayersBrowser(QWidget * parent = 0);
		~LayersBrowser();
		void setupUI();
		void initLayersList(ParticleSystem* ps);
		ParticleSystemLayer getSelectedLayer();
	public slots:
		void slotsClearLayerList();
		void slotsSelectIndexOfLayersList(int index);
		void slotsNewLayerButtonPushed();
		void slotsTrashLayerButtonPushed();
		void slotsRenameLayerButtonPushed();
		void slotsToggleLayers(bool enabled);
		void slotsHideLayerButtonPushed();
		void slotsResetLayerButtonPushed();
	private:
		QListWidget*					_layerList;
		QPushButton*					_newLayerButton;
		QPushButton*					_trashLayerButton;
		QPushButton*					_hideLayerButton;
		QPushButton*					_renameLayerButton;
		QPushButton*					_resetParticleButton;
		ParticleSystem*					_particleSystem;
	signals:
		void signalsSelectLayerChanged(ParticleSystemLayer);
		void signalsToggleLayer(ParticleSystemLayer);
	};
}